<?php

class Secure_Form_Site extends Zend_Form
{
    public function __construct($options = null)
    {
        parent::__construct($options);
        $this->setName('espece');

        //$idespece = new Zend_Form_Element_Hidden('idespece');

       // ->addValidator();
        
        
    	$debut = new Zend_Form_Element_Text('site_longitude');
		$debut->setLabel('Longitude du site')
         ->setRequired(true)
         ->setAttrib("required","required")
         ->addFilter('StripTags')
         ->addFilter('StringTrim')
         ->addValidator('NotEmpty');

    	$fin = new Zend_Form_Element_Text('site_lattitude');
		$fin->setLabel('Lattitude du site')
         ->setRequired(true)
         ->setAttrib("required","required")
         ->addFilter('StripTags')
         ->addFilter('StringTrim')
         ->addValidator('NotEmpty');
         
       $altitude = new Zend_Form_Element_Text('site_altitude');
		$altitude->setLabel('Altitude du site')
         ->setRequired(true)
         ->setAttrib("required","required")
         ->addFilter('StripTags')
         ->addFilter('StringTrim')
         ->addValidator('NotEmpty');
 
		$type = new Zend_Form_Element_Select('site_mare');
		$type->setLabel('Mare')
         ->setRequired(true)
         ->setAttrib("required","required")
         ->addFilter('StripTags')
         ->addFilter('StringTrim')
         ->addValidator('NotEmpty');
         
         
         
        $type = new Zend_Form_Element_Select('site_instrument');
		$type->setLabel('Instrument de mesure')
         ->setRequired(true)
         ->setAttrib("required","required")
         ->addFilter('StripTags')
         ->addFilter('StringTrim')
         ->addValidator('NotEmpty');
         
         $type->addMultiOption("Hobo", "Hobo");
         $type->addMultiOption("Campbell", "Campbell");
 		
		$comment = new Zend_Form_Element_Textarea('campaign_comment');
		$comment->setLabel('Commentaires')
		->setAttrib("required","required")
		->setAttrib('cols', '70')
   		 ->setAttrib('rows', '5')
		->setRequired(true);
		
		
		
        $submit = new Zend_Form_Element_Submit('valider');
        $submit->setAttrib('id', 'submitbutton');
        
    
        $this->addElements(array($debut, $fin,$altitude, $type, $comment, $submit ));
        $this->setAction(Zend_Controller_Front::getInstance()->getBaseUrl().'/index/adduser');
    }
    
    
    
   
}